package alibaba.client.utils;

import org.apache.commons.cli.Option;

import alibaba.client.cli.OptionBuilder;

public class CliUtils {

    public static Option createOption(String longOption, String argumentName, String description, boolean required, boolean hasArgument) {
        return new OptionBuilder()
            .longOption(longOption)
            .numberOfArguments(hasArgument ? 1 : 0)
            .argumentName(argumentName)
            .description(description)
            .required(required)
            .create();
    }
    
}
